package src.World;

public class GroundItem
{
    private int itemId = -1;
    private int itemAmt = 0;
    private int itemX = 0;
    private int itemY = 0;
    private int itemHeight = 0;
    private int itemGroundTime = 120;
    private String itemDroppedBy = "";
    private int index = 0;

    public GroundItem(int _index, int id, int amt, int x, int y, int h, String owner)
    {
        index = _index;
        itemId = id;
        itemAmt = amt;
        itemX = x;
        itemY = y;
        itemHeight = h;
        itemDroppedBy = owner;
    }

    public int getId()
    {
        return itemId;
    }

    public int getAmt()
    {
        return itemAmt;
    }

    public int getX()
    {
        return itemX;
    }

    public int getY()
    {
        return itemY;
    }

    public int getHeight()
    {
        return itemHeight;
    }

    public int getTime()
    {
        return itemGroundTime;
    }

    public String getOwner()
    {
        return itemDroppedBy;
    }

    public int getIndex()
    {
        return index;
    }

    public void updateAmt(int amt)
    {
        itemAmt += amt;
    }

    public void updateTime(int t)
    {
        itemGroundTime -= t;
    }

    public void destruct()
    {
        itemId = -1;
        itemAmt = 0;
        itemX = -1;
        itemY = -1;
        itemHeight = -1;
    }
}